package C05C;

public class Fruit {
    public  String Name ;
    public  String area ;
    public  double price ;
    // .............................................
    public Fruit(String name, String area, double price) {
        Name = name;
        this.area = area;
        this.price = price;
    }
    public Fruit(){};
    public String getName() {
        return Name;
    }

    public void setName(String name) {
        Name = name;
    }

    public String getArea() {
        return area;
    }

    public void setArea(String area) {
        this.area = area;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }
    //.........................................


    @Override
    public String toString() {
        return "水果：" +"\n"+
                "  名字：" + Name + '\t' +
                "  产地：" + area + '\t' +
                "  单价：" + price ;
    }
}
